Facebook is becoming very popular and bringing more advanced options every month and attracting the members. I like mindjolt facebook application and i enjoyed almost all the games. Tower Stacker is one of game i like the most from mindjolt. That game is a simple game and a very interesting game too. So, I planned to create the same game in AS3. I know that game needs some math functions like "atan2" to swing the holder.
Objective of this game:
rope_mc.rotation=Math.atan2(rope_mc.x-xSpeed,ySpeed)*90/Math.PI;
to make it swing, I am multiplying the speed with -1 on each swing like,
if (holderStatus=="swing") {
if (xSpeed>=540||xSpeed<=50) {
speed*=-1;
}
xSpeed+=speed;
}
Now I should drop the ball on each mouse click, and placed the ball on stack based on some conditions. I used a separate movieclip to have the base of the stack and to add the balls each time on mouse click. From the second ball, each ball will be placed on the stack only if it is hit the previous one in a least best position. The score will be calculated based on the position it placed on the stack.
Objective of this game:
- Holder should pick a new tower ball and start to swing
- Holder should place the ball on the selected location
- Again a new ball will be generated and started swing. If the recent ball placed on the line of the previous ball, the ball is on the stack or it will fall down from the stack.
- The score is based on the exact location of the recent ball with the last ball placed on the stack.
rope_mc.rotation=Math.atan2(rope_mc.x-xSpeed,ySpeed)*90/Math.PI;
to make it swing, I am multiplying the speed with -1 on each swing like,
if (holderStatus=="swing") {
if (xSpeed>=540||xSpeed<=50) {
speed*=-1;
}
xSpeed+=speed;
}
Now I should drop the ball on each mouse click, and placed the ball on stack based on some conditions. I used a separate movieclip to have the base of the stack and to add the balls each time on mouse click. From the second ball, each ball will be placed on the stack only if it is hit the previous one in a least best position. The score will be calculated based on the position it placed on the stack.
You like it? Let me come with some other game soon.